package com.lins.saas;

import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Iterator;

/**
 * @author linsir
 * @title: SaaSApplication
 * @projectName lins
 * @description: TODO
 * @date 2021/12/11 17:22
 */

@SpringBootApplication
public class SaaSApplication {
    public static void main( String[] args )
    {

        SpringApplication springApplication =new SpringApplication(SaaSApplication.class);

        ConfigurableApplicationContext configurableApplicationContext= springApplication.run(args);


        //SpringApplication.run(LinWebApplication.class);

        ConfigurableListableBeanFactory configurableListableBeanFactory = configurableApplicationContext.getBeanFactory();

        Iterator<String> beans=  configurableListableBeanFactory.getBeanNamesIterator();

        for (Iterator<String> it = beans; it.hasNext(); ) {
            String bean = it.next();

            System.out.println(bean);
        }
    }
}
